package com.donger.upms.biz.controller;


import com.donger.common.core.utils.Res;
import com.donger.common.core.utils.Result;
import com.donger.upms.api.service.MobileService;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


/**
 * 短信发送
 *
 * @author aeizzz
 */
@RestController
@AllArgsConstructor
@RequestMapping("/sys/mobile")
public class MobileController {

    private final MobileService mobileService;

    @GetMapping("/{mobile}")
    public Result sendSmsCode(@PathVariable String mobile) {
        mobileService.sendSmsCode(mobile);
        return Res.ok();
    }
}
